package main

import "fmt"

// define the interface
type Phone interface {
	call()
}

// define the struct NokiaPhone
type NokiaPhone struct {
}

// define the struct's method
func (nokia NokiaPhone) call() {
	fmt.Println("NokiaPhone-methods")
}

// define the struct Iphone
type IPhone struct {
}

// define the struct's method
func (iphone IPhone) call() {
	fmt.Println("iphone-methods")
}

func main() {
	// define the variable phone, it's the Phone Interface
	var phone1 Phone
	var phone2 Phone

	phone1 = new(NokiaPhone) // it's NokiaPhone

	phone2 = new(IPhone)

	phone1.call()

	phone2.call()

}
